A data storage device or memory device is a device capable of storing digital data items. A data item may comprise one or several bits. A data storage device may comprise one or more memory locations at which data can be stored. Each memory location may have an address for identifying the memory location. Depending on the type of data storage device, a memory location may be known as a register. Generally speaking, a memory location may, however, comprise one or more than one register. It may desirable or imperative to protect a stored data item against data corruption and against unauthorized access.
Data corruption comprises a variety of effects that may provoke unintended changes to a stored data item. An example of data corruption is a bit flip, that is a state change of a bit of the data item, due to, e.g., neutron impact or electrostatic discharge. Access to a stored data item may comprise reading the data item from the memory location at which it is stored as well as overwriting the data item at the memory location. One way of tackling the problem of data corruption involves the use of error detecting codes (EDC), in particular error correcting codes (ECC). An error correcting code is an error detecting code that allows not only detecting a bit change in a data item but correcting it as well. Memories with error correcting codes (ECC memories) are widely used in various kinds of data processing systems, including systems for low cost safety applications.
Techniques for preventing unauthorized access to stored data are known in the art as memory protection. Memory protection may, for example, comprise managing access rights within a memory space. Memory protection may be designed, for example, to allow or deny memory accesses depending on access characteristics such as access initiator, target address, and access type. An access type may, for example, be one of the following types: data read or write operations, instruction fetches during code execution, and vector fetches for exception handling. Memory protection may be implemented, for example, by means of a memory protection unit (MPU). An MPU may be arranged, for instance, to monitor accesses or access attempts and to validate any access or access attempt against a configurable set of rules. An MPU may, however, require expensive hardware. Therefore, MPUs may be not well suited for cost-sensitive applications. Notably, storage for sets of rules and bus monitor logic can make an MPU expensive to build.